#include <stdio.h>
#include <stdbool.h>

// 0~9      A~Z         a~z
// 48~57    65~90       97~122


bool isPalindrome(char* s) {
    char* ptr = s;
    int index = 0;
    while(*s != '\0') {
        if(*s >= '0' && *s <= '9' || *s >= 'a' && *s <= 'z') {
            ptr[index] = *s;
            index++;
        }
        else if (*s >= 'A' && *s <= 'Z') {
            ptr[index] = *s + 32;
            index++;
        }
        s++;
    }
    ptr[index] = '\0';
    printf("%s\n", ptr);

    /////////////////////////////////////////

    int begin = 0;
    int end = index - 1;
    while (end - begin > 0) {
        if(ptr[begin++] != ptr[end--]) 
            return false;
    }
    return true;
}

int main() {
    printf(isPalindrome("abb") ? "true" : "false");
    return 0;
}